package com.example.thirdhomework

import android.content.Intent
import android.os.Bundle
import android.widget.Button
import android.widget.EditText
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat

class ThirdActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_third)
        val confirm = findViewById<Button>(R.id.comfirm)
        confirm.setOnClickListener {
            val intent = Intent()
            val editText = findViewById<EditText>(R.id.editTextText2)
            intent.putExtra(SECOND_MSG,editText.text.toString())
            setResult(1,intent)
            finish()
        }
    }
}